﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Example17.aspx.cs" Inherits="Chapter05.Example17" %>

<!DOCTYPE html>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>代码清单 5-17 删除对象属性</title>
</head>
<body>
    <form>
        <div>
            <script type="text/javascript">
                var myData = {
                    name: "Adam",
                    weather: "sunny",
                };

                myData.sayHello = function () {
                    document.writeln("Hello");
                }

                delete myData.name;
                delete myData["weather"];
                delete myData.sayHello;
            </script>
        </div>
    </form>
</body>
</html>
